
import 'package:bitsdojo_window/bitsdojo_window.dart';
import 'package:fluent_ui/fluent_ui.dart';
import '../pages/login.dart';

closeWindow(context){
  showDialog(
    context: context,
    builder: (_) {
      return ContentDialog(
        title: const Text('关闭窗口'),
        content: const Text('是否要关闭当前窗口?'),
        actions: [
          FilledButton(
            child: const Text('关闭'),
            onPressed: () {
              Navigator.pop(context);
              appWindow.close();
            },
          ),
          Button(
            child: const Text('取消'),
            onPressed: () {
              Navigator.pop(context);
            },
          ),
        ],
      );
    },
  );
}
showLoginContentDialog(context){
  showDialog(
    context: context,
    builder: (_) {
      return ContentDialog(
        title: const Text('用户登录'),
        content: Login(),
        actions: [
          FilledButton(
            child: const Text('关闭'),
            onPressed: () {
              Navigator.pop(context);
              appWindow.close();
            },
          )
        ],
      );
    },
  );

}